package neanda.engine.core;

import java.awt.Graphics;
import java.util.Vector;

import neanda.engine.core.entity.Entity;

public class Game implements Gameable 
{
	public static Vector<Entity> entities = new Vector<Entity>();
	
	public Game()
	{
		EngineController.addGameableListener(this);
	}
	
	@Override
	public void initialization()
	{

	}

	@Override
	public void frame(long delta)
	{
		EngineController.getWindow().drawObjects(g);
	}
	
	
	
	private void animationObjects(long delta)
	{
		if(entities.size() > 0)
		{
			for(Entity e:entities)
			{
				e.animation(delta);
			}
		}
	}
	
	private void moveObjects(long delta)
	{
		if(entities.size() > 0)
		{
			for(Entity e:entities)
			{
				e.move(delta);
			}
		}
	}
	
	
}
